﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="systemPriceModulus.aspx.cs"
    Inherits="PeisongWeb.admin.systemPriceModulus" %>

<%@ Register TagName="top" Src="controls/top.ascx" TagPrefix="uc1" %>
<%@ Register TagName="menu" Src="controls/menu.ascx" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>系统加价系数管理 - 想购网长期采购物流配送系统</title>
    <!--#include file="style.inc"-->

    <script src="../app_common/scripts/jquery-1.4.2.min.js" type="text/javascript"></script>

    <script src="../app_common/scripts/QueryString.js" type="text/javascript"></script>

    <script src="scripts/systemAutoPercent.js?8.0" type="text/javascript"></script>

</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="sm1" runat="server">
    </asp:ScriptManager>
    <ext:ScriptManager ID="ScriptManager1" runat="server" />
    <uc1:top ID="Top1" runat="server" />
    <uc2:menu ID="Menu1" runat="server" />
    <div id="admin-body">
        <h2 class="section-cms">
            系统加价系数管理
        </h2>
        <ext:Panel ID="Panel2" runat="server" Title="系统加价" BodyStyle="padding:5px 5px 0"
            Width="1024" Frame="true" ButtonAlign="Center">
            <Body>
                <ext:TabPanel ID="TabPanel1" runat="server" ActiveTabIndex="0" BodyStyle="0px;" Plain="true">
                    <Tabs>
                        <ext:Tab ID="Tab1" runat="server" Title="按小类设置系统加价" AutoHeight="true" Frame="true">
                            <Body>
                                <div id="admin_edit_content_search" style="padding-top: 10px; padding-bottom: 25px;
                                    background-color: #DFE8F6">
                                    <ul>
                                        <li style="width: auto; padding-right: 10px">
                                            <label>
                                                采购档次</label>
                                            <asp:DropDownList runat="server" ID="ddl_businessNature" DataTextField="name" DataValueField="xm"
                                                Style="height: 22px">
                                            </asp:DropDownList>
                                        </li>
                                        <li>
                                            <label>
                                                大类</label>
                                            <asp:DropDownList runat="server" ID="drp_parent" DataTextField="name" DataValueField="categoryId">
                                            </asp:DropDownList>
                                        </li>
                                        <li style="width: auto;">[<asp:LinkButton ID="linkSearch" runat="server" Text="搜 索"
                                            OnClick="linkSearch_Click" CausesValidation="false">
                                        </asp:LinkButton>] &nbsp;&nbsp;&nbsp; [<a href="javascript:resetCategory();">重 置</a>]
                                            <asp:LinkButton ID="lbn_Import" runat="server" Text="［导出］" CausesValidation="false"
                                                OnClick="lbn_Import_Click">
                                            </asp:LinkButton>
                                        </li>
                                    </ul>
                                </div>
                                <div id="admin_list_content" style="width: 1000px">
                                    <ul>
                                        <asp:Repeater runat="server" ID="rptPriceStructure">
                                            <ItemTemplate>
                                                <li style="float: left; width: 200px; text-align: right; margin-right: 20px">
                                                    <label style="width: 150px;">
                                                        <%#DataBinder.Eval(Container.DataItem,"category")%>
                                                    </label>
                                                    <input onblur='checkNum(this);' onafterpaste='checkNum(this);' style='text-align: right;
                                                        width: 20px;' maxlength='3' id='input_percent<%#Eval("parentId").ToString()=="0"?"0":"" %>_<%#Eval("categoryId")%>'
                                                        type='text' value='<%# Convert.ToDouble(Eval("sysAutoAdd"))*100%>'>% </li>
                                            </ItemTemplate>
                                        </asp:Repeater>
                                    </ul>
                                </div>
                                <div style="clear: both; text-align: center">
                                    <span style='<%=power>=2?"": "display:none" %>'>
                                        <asp:Button ID="btn_PriceStructureSave" runat="server" OnClientClick="return getPriceStructure();"
                                            Text="保 存" OnClick="btn_PriceStructureSave_Click" />
                                    </span>
                                    <input type="hidden" runat="server" id="hd_pricePercent" />
                                </div>
                            </Body>
                        </ext:Tab>
                        <ext:Tab ID="Tab2" runat="server" Title="按商品设置系统加价" AutoHeight="true" Frame="true">
                            <Body>
                                <asp:UpdatePanel runat="server" ID="UpdatePanel1">
                                    <Triggers>
                                        <asp:PostBackTrigger ControlID="lbn_ImportByProduct" />
                                    </Triggers>
                                    <ContentTemplate>
                                        <div id="admin_edit_content_search" style="padding-top: 10px; padding-bottom: 50px;
                                            background-color: #DFE8F6">
                                            <ul>
                                                <li style="width: 150px;">
                                                    <label style="width: 75px;">
                                                        采购档次</label>
                                                    <asp:DropDownList runat="server" ID="ddl_BN" DataTextField="name" DataValueField="xm"
                                                        Style="height: 22px">
                                                    </asp:DropDownList>
                                                </li>
                                                <li style="width: 200px;">
                                                    <label style="width: 75px;">
                                                        大类：</label>
                                                    <asp:DropDownList runat="server" ID="ddlRootCategory" DataTextField="name" DataValueField="categoryId"
                                                        AutoPostBack="True" OnSelectedIndexChanged="ddlRootCategory_SelectedIndexChanged">
                                                    </asp:DropDownList>
                                                </li>
                                                <li style="width: 200px; margin-right: 5px;">
                                                    <label style="width: 75px;">
                                                        小类：</label>
                                                    <asp:DropDownList runat="server" ID="ddlSubCategory" DataTextField="name" DataValueField="categoryId"
                                                        AutoPostBack="True">
                                                    </asp:DropDownList>
                                                </li>
                                                <li style="width: auto; margin-right: 5px">
                                                    <label style="width: 75px;">
                                                        商品名称</label>
                                                    <asp:TextBox runat="server" ID="txtProductName" Width="85px"></asp:TextBox>
                                                </li>
                                                <li style="width: auto; margin-right: 5px">
                                                    <label style="width: 75px;">
                                                        商品编号</label>
                                                    <asp:TextBox runat="server" ID="txtProductNo" Width="85px"></asp:TextBox>
                                                </li>
                                                <li style="width: auto; float: right; margin-right: 100px">[<asp:LinkButton ID="lnkSelect"
                                                    runat="server" Text="搜 索" OnClick="lnkSelect_Click" CausesValidation="false">
                                                </asp:LinkButton>] &nbsp;&nbsp;&nbsp; [<a href="javascript:resetByProduct();">重 置</a>]
                                                    <asp:LinkButton ID="lbn_ImportByProduct" runat="server" Text="［导出］" CausesValidation="false"
                                                        OnClick="lbn_ImportByProduct_Click">
                                                    </asp:LinkButton>
                                                </li>
                                            </ul>
                                        </div>
                                        <div id="admin_list_content" style="width: 930px;">
                                            <table cellpadding="0" cellspacing="0">
                                                <tr class="header-row">
                                                    <th width="10%">
                                                        采购档次
                                                    </th>
                                                    <th width="10%">
                                                        商品编号
                                                    </th>
                                                    <th width="25%">
                                                        商品名称
                                                    </th>
                                                    <th width="15%">
                                                        当前系统加价
                                                    </th>
                                                    <th width="10%" style="<%=hasPermission("CF",2)?"": "display:none;" %>">
                                                        系统加价
                                                    </th>
                                                    <th width="15%" style="<%=hasPermission("CF",2)?"": "display:none;" %>">
                                                        操作
                                                    </th>
                                                </tr>
                                                <asp:Repeater runat="server" ID="rpt_list" OnItemCommand="rpt_list_ItemCommand">
                                                    <ItemTemplate>
                                                        <tr class='<%# Container.ItemIndex%2==0? "row-alt":"alt"  %>'>
                                                            <td>
                                                                <%#DataBinder.Eval(Container.DataItem,"bnName") %>
                                                            </td>
                                                            <td>
                                                                <%#DataBinder.Eval(Container.DataItem,"productNo") %>
                                                            </td>
                                                            <td>
                                                                <%#DataBinder.Eval(Container.DataItem,"productName") %>
                                                            </td>
                                                            <td style="color: Green;">
                                                                <%#DataBinder.Eval(Container.DataItem,"productAutoAdd","{0:F3}") %>
                                                            </td>
                                                            <td style="<%=hasPermission("CF",2)?"": "display:none;" %>">
                                                                <input type="text" style="width: 75px;" value='<%#Eval("productAutoAdd")%>' />
                                                            </td>
                                                            <td style="<%=hasPermission("CF",2)?"": "display:none;" %>">
                                                                <asp:LinkButton runat="server" ID="link_Edit" OnClientClick="return checkPrice(this);"
                                                                    CommandName="Edit" CommandArgument='<%#Eval("productId") %>'>保存</asp:LinkButton>
                                                            </td>
                                                        </tr>
                                                    </ItemTemplate>
                                                </asp:Repeater>
                                            </table>
                                            <div id="page">
                                                <webdiyer:AspNetPager ID="AspNetPager1" NumericButtonType="Text" MoreButtonType="Text"
                                                    OnPageChanged="AspNetPager1_PageChanged" runat="server" AlwaysShow="True" PageSize="20"
                                                    InvalidPageIndexErrorMessage="无效页码" PageIndexOutOfRangeErrorMessage="页码超出范围"
                                                    ShowCustomInfoSection="Left" CustomInfoHTML=" 每页%PageSize%条记录 | 总共%RecordCount%条记录 "
                                                    CustomInfoTextAlign="Left" HorizontalAlign="Right" NextPageText="下一页" FirstPageText="首页"
                                                    LastPageText="末页" PrevPageText="上一页">
                                                </webdiyer:AspNetPager>
                                            </div>
                                        </div>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </Body>
                        </ext:Tab>
                    </Tabs>
                </ext:TabPanel>
            </Body>
        </ext:Panel>
    </div>
    <asp:HiddenField runat="server" ID="hdCurrentNewAutoAdd" />
    <asp:HiddenField runat="server" ID="hdCurrentOldAutoAdd" />
    </form>
</body>
</html>
